package com.nuoniu.sibanyun.entity.erp.in;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 物料档案
 * </p>
 *
 * @author baiqiang
 * @since 2020-09-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("scb_material_archive")
@ApiModel(value="InInventory对象", description="物料档案")
public class InInventory extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "物料名称")
    @TableField("inventory_name")
    private String inventoryName;

    @ApiModelProperty(value = "物料编码")
    @TableField("inventory_code")
    private String inventoryCode;

    @ApiModelProperty(value = "物料分类id")
    @TableField("inventory_class_id")
    private Integer inventoryClassId;

    @ApiModelProperty(value = "物料分类名称")
    @TableField("inventory_class_name")
    private String inventoryClassName;

    @ApiModelProperty(value = "拼音码")
    @TableField("py_code")
    private String pyCode;

    @ApiModelProperty(value = "英文名字")
    @TableField("inventory_en_name")
    private String inventoryEnName;

    @ApiModelProperty(value = "规格型号")
    @TableField("inventory_specification")
    private String inventorySpecification;

    @ApiModelProperty(value = "计价方式")
    @TableField("pricing_method")
    private String pricingMethod;

    @ApiModelProperty(value = "可替换件")
    @TableField("replace_item")
    private String replaceItem;

    @ApiModelProperty(value = "存货分类ID")
    @TableField("inventory_category_id")
    private Integer inventoryCategoryId;

    @ApiModelProperty(value = "存货分类名称")
    @TableField("inventory_category_name")
    private String inventoryCategoryName;

    @ApiModelProperty(value = "计量方式 : 单计量,多计量")
    @TableField("unit_type")
    private String unitType;

    @ApiModelProperty(value = "计量单位(单计量使用)")
    @TableField(value = "unit_id", updateStrategy = FieldStrategy.IGNORED)
    private Integer unitId;

    @ApiModelProperty(value = "计量单位(单计量使用)")
    @TableField(value = "unit_name", updateStrategy = FieldStrategy.IGNORED)
    private String unitName;

    @ApiModelProperty(value = "计量单位组Id")
    @TableField(value = "unit_group_id", updateStrategy = FieldStrategy.IGNORED)
    private Integer unitGroupId;

    @ApiModelProperty(value = "计量单位组")
    @TableField(value = "unit_group_name", updateStrategy = FieldStrategy.IGNORED)
    private String unitGroupName;

    @ApiModelProperty(value = "计量单位类别1固定2浮动")
    @TableField("unit_class")
    private Integer unitClass;

    @ApiModelProperty(value = "浮动默认 换算率 ")
    @TableField("change_rate")
    private BigDecimal changeRate;

    @ApiModelProperty(value = "主计量单位ID")
    @TableField(value = "main_unit", updateStrategy = FieldStrategy.IGNORED)
    private Integer mainUnit;

    @ApiModelProperty(value = "主计量单位名称")
    @TableField(value = "main_unit_name", updateStrategy = FieldStrategy.IGNORED)
    private String mainUnitName;

    @ApiModelProperty(value = "报表辅单位ID")
    @TableField("sub_unit_by_report")
    private Integer subUnitByReport;


    @ApiModelProperty(value = "报表辅单位")
    @TableField("sub_unit_by_report_name")
    private String subUnitByReportName;

    @ApiModelProperty(value = "采购常用单位ID")
    @TableField("pur_unit")
    private Integer purUnit;

    @ApiModelProperty(value = "采购常用单位")
    @TableField("pur_unit_name")
    private String purUnitName;

    @ApiModelProperty(value = "销售常用单位ID")
    @TableField("sale_unit")
    private Integer saleUnit;

    @ApiModelProperty(value = "销售常用单位")
    @TableField("sale_unit_name")
    private String saleUnitName;

    @ApiModelProperty(value = "库存常用单位ID")
    @TableField("in_unit")
    private Integer inUnit;

    @ApiModelProperty(value = "库存常用单位")
    @TableField("in_unit_name")
    private String inUnitName;

    @ApiModelProperty(value = "生产计量单位ID")
    @TableField("pro_unit")
    private Integer proUnit;

    @ApiModelProperty(value = "生产计量单位ID")
    @TableField("pro_unit_name")
    private String proUnitName;

    @ApiModelProperty(value = "零售计量单位ID")
    @TableField("retail_unit")
    private Integer retailUnit;

    @ApiModelProperty(value = "零售计量单位")
    @TableField("retail_unit_name")
    private String retailUnitName;

    @ApiModelProperty(value = "成本常用计量单位ID")
    @TableField("cost_unit")
    private Integer costUnit;

    @ApiModelProperty(value = "成本常用计量单位")
    @TableField("cost_unit_name")
    private String costUnitName;

    @ApiModelProperty(value = "库存信息：入库上限比例%")
    @TableField("in_storage_up_limit")
    private BigDecimal inStorageUpLimit;

    @ApiModelProperty(value = "库存信息：出库上限比例%")
    @TableField("out_storage_up_limit")
    private BigDecimal outStorageUpLimit;

    @ApiModelProperty(value = "默认仓库id")
    @TableField("warehouse_id")
    private Integer warehouseId;

    @ApiModelProperty(value = "默认仓库名称")
    @TableField("warehouse_name")
    private String warehouseName;

    @ApiModelProperty(value = "默认货位id")
    @TableField("location_id")
    private Integer locationId;

    @ApiModelProperty(value = "默认货位名称")
    @TableField("location_name")
    private String locationName;

    @ApiModelProperty(value = "品牌")
    @TableField("in_brand")
    private String inBrand;

    @ApiModelProperty(value = "税率")
    @TableField("tax_rate")
    private BigDecimal taxRate;

    @ApiModelProperty(value = "销项税率")
    @TableField("sales_tax_rate")
    private BigDecimal salesTaxRate;

    @ApiModelProperty(value = "进项税率")
    @TableField(" income_tax_rate")
    private BigDecimal  incomeTaxRate;

    @ApiModelProperty(value = "营销机构")
    @TableField("agencies_name")
    private String agenciesName;

    @ApiModelProperty(value = "营销机构Id")
    @TableField("agencies_id")
    private Integer agenciesId;

    @ApiModelProperty(value = "是否外购 0:否1:是")
    @TableField("is_purchasing")
    private Boolean isPurchasing;

    @ApiModelProperty(value = "是否销售 0:否1:是")
    @TableField("is_for_sale")
    private Boolean isForSale;

    @ApiModelProperty(value = "是否自制 0:否1:是")
    @TableField("is_made_self")
    private Boolean isMadeSelf;

    @ApiModelProperty(value = "是否在制 0:否1:是")
    @TableField("is_semi_manufactured")
    private Boolean isSemiManufactured;

    @ApiModelProperty(value = "是否生产耗用 0:否1:是")
    @TableField("is_material")
    private Boolean isMaterial;

    @ApiModelProperty(value = "是否劳务费用 0:否1:是")
    @TableField("is_labor_cost")
    private Boolean isLaborCost;

    @ApiModelProperty(value = "是否成套件 0:否1:是")
    @TableField("is_suite")
    private Boolean isSuite;

    @ApiModelProperty(value = "是否委托外加工 0:否1:是")
    @TableField("is_made_request")
    private Boolean isMadeRequest;

    @ApiModelProperty(value = "是否虚拟键 0:否1:是")
    @TableField("is_invented_key")
    private Boolean isInventedKey;

    @ApiModelProperty(value = "ABC分类")
    @TableField("abc_class")
    private String abcClass;

    @ApiModelProperty(value = "最低库存")
    @TableField("min_storage")
    private BigDecimal minStorage;

    @ApiModelProperty(value = "最高库存")
    @TableField("max_storage")
    private BigDecimal maxStorage;

    @ApiModelProperty(value = "安全库存")
    @TableField("safe_storage")
    private BigDecimal safeStorage;

    @ApiModelProperty(value = "积压标准")
    @TableField("backlog_criteria")
    private BigDecimal backlogCriteria;

    @ApiModelProperty(value = "合理损耗率")
    @TableField("loss_rate")
    private BigDecimal lossRate;

    @ApiModelProperty(value = "标准周转天数")
    @TableField("turnover_days")
    private Integer turnoverDays;

    @ApiModelProperty(value = "最新周转天数")
    @TableField("latest_turnover_days")
    private Integer latestTurnoverDays;

    @ApiModelProperty(value = "补货销量天数")
    @TableField("sales_days")
    private Integer salesDays;

    @ApiModelProperty(value = "采购提前期")
    @TableField("purchasing_lead_time")
    private Integer purchasingLeadTime;

    @ApiModelProperty(value = "盘点周期")
    @TableField("cycle_counting")
    private Integer cycleCounting;

    @ApiModelProperty(value = "盘点开始时间")
    @TableField("start_count_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm" )
    private LocalDateTime startCountTime;

    @ApiModelProperty(value = "上次盘点时间")
    @TableField("last_count_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm" )
    private LocalDateTime lastCountTime;

    @ApiModelProperty(value = "现存量")
    @TableField("storage_on_hand")
    private Long storageOnHand;

    @ApiModelProperty(value = "售价")
    @TableField("selling_price")
    private BigDecimal sellingPrice;

    @ApiModelProperty(value = "参考售价")
    @TableField("ref_selling_price")
    private BigDecimal refSellingPrice;

    @ApiModelProperty(value = "最低售价")
    @TableField("min_selling_price")
    private BigDecimal minSellingPrice;

    @ApiModelProperty(value = "参考成本")
    @TableField("reference_cost")
    private BigDecimal referenceCost;

    @ApiModelProperty(value = "最新成本")
    @TableField("latest_cost")
    private BigDecimal latestCost;

    @ApiModelProperty(value = "最高进价")
    @TableField("max_purchase_price")
    private BigDecimal maxPurchasePrice;

    @ApiModelProperty(value = "销售加成率")
    @TableField("mark_up_rate")
    private BigDecimal markUpRate;

    @ApiModelProperty(value = "条码管理")
    @TableField("bar_code")
    private String barCode;

    @ApiModelProperty(value = "批号管理")
    @TableField("batch_management")
    private String batchManagement;

    @ApiModelProperty(value = "批次流水号")
    @TableField("batch_serial")
    private String batchSerial;

    @ApiModelProperty(value = "有效期管理")
    @TableField("period_of_validity")
    private String periodOfValidity;

    @ApiModelProperty(value = "保质期")
    @TableField("guarantee_period")
    private String guaranteePeriod;

    @ApiModelProperty(value = "保质期单位")
    @TableField("shelf_life_unit")
    private String shelfLifeUnit;

    @ApiModelProperty(value = "物料描述")
    @TableField("inventory_descript")
    private String inventoryDescript;

    @ApiModelProperty(value = "物料图片")
    @TableField("in_picture")
    private String inPicture;


    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人名称")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人名称")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "状态0正常1删除2停用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;

    @ApiModelProperty(value = "商品属性")
    @TableField("commodity_attribute")
    private String commodityAttribute;

    @ApiModelProperty(value = "毛重")
    @TableField("gross_weight")
    private BigDecimal grossWeight;

    @ApiModelProperty(value = "净重")
    @TableField("net_weight")
    private BigDecimal netWeight;

    @ApiModelProperty(value = "重量单位")
    @TableField("weight_unit")
    private String weightUnit;

    @ApiModelProperty(value = "属性_长")
    @TableField("commodity_length")
    private BigDecimal commodityLength;

    @ApiModelProperty(value = "属性_宽")
    @TableField("commodity_width")
    private BigDecimal commodityWidth;

    @ApiModelProperty(value = "属性_高")
    @TableField("commodity_height")
    private BigDecimal commodityHeight;

    @ApiModelProperty(value = "属性_面积")
    @TableField("commodity_square")
    private BigDecimal commoditySquare;

    @ApiModelProperty(value = "属性_体积")
    @TableField("commodity_volume")
    private BigDecimal commodityVolume;

    @ApiModelProperty(value = "尺寸单位")
    @TableField("dimension_unit")
    private String dimensionUnit;
}
